package com.qczl.pme.dao.impl;

import java.util.List;

import org.hibernate.SQLQuery;
import org.springframework.stereotype.Repository;

import com.qczl.core.dao.impl.BaseDaoImpl;
import com.qczl.pme.dao.AreaDao;
import com.qczl.pme.entity.PMEArea;

/**
 * 区域信息数据访问层实现类
 * @author SongR
 *
 */
@Repository
public class AreaDaoImpl extends BaseDaoImpl<PMEArea> implements AreaDao{
	@SuppressWarnings("unchecked")
	@Override
	public List<PMEArea> getBySqlL(String sql, int start, int size) {
		SQLQuery q = this.getCurrentSession().createSQLQuery(sql);
		q.addEntity(PMEArea.class);
		return q.setFirstResult(start).setMaxResults(size).list();
	}
}
